package com.fengmi.user.controller;


import com.fengmi.user.SysUser;
import com.fengmi.user.service.ISysUserService;
import com.fengmi.vo.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 用户信息表 前端控制器
 * </p>
 *
 * @author zhuxm
 * @since 2021-10-22
 */
@RestController
@RequestMapping("/user/")
public class SysUserController {
    @Autowired
    private ISysUserService userService;
    @RequestMapping("login")
    public ResultVO login(@RequestBody SysUser sysUser){
            return userService.login(sysUser);
    }
    @RequestMapping("verifyToken")
    public ResultVO verifyToken(@RequestHeader("token") String  token){
        return userService.verifyToken(token);
    }
}
